{include file='common/header'}
{include file='common/menu'}


<!-- Page Content -->
<div class="page-content">
    <!-- Page Breadcrumb -->
    <div class="page-breadcrumbs">
        <ul class="breadcrumb">
            <li>
                <a href="#">系统</a>
            </li>
            <li>
                <a href="{:url('auth_rule/lis')}">权限列表</a>
            </li>
            <li class="active">修改权限</li>
        </ul>
    </div>
    <!-- /Page Breadcrumb -->

    <!-- Page Body -->
    <div class="page-body">

        <div class="row">
            <div class="col-lg-12 col-sm-12 col-xs-12">
                <div class="widget">
                    <div class="widget-header bordered-bottom bordered-blue">
                        <span class="widget-caption">修改权限</span>
                    </div>
                    <div class="widget-body">
                        <div id="horizontal-form">
                            <form class="form-horizontal" role="form" action="" method="post">
                                <input type="hidden" name="id" value="{$auth_rule.id}">
                                <div class="form-group">
                                    <label for="pid" class="col-sm-2 control-label no-padding-right">上级权限</label>
                                    <div class="col-sm-6">
                                        <select name="pid" id="pid" class="form-control">
                                            <option value="0">顶级权限</option>
                                            {volist name="rules" id="rule"}
                                            {if condition="$rule.id neq $auth_rule.id"}
                                            <option value="{$rule.id}" {if condition="$auth_rule.pid eq $rule.id"}selected{/if}>{if condition="$rule['level'] neq 0"}|{/if}<?php echo str_repeat('---', $rule['level']) ?>{$rule.title}</option>
                                            {/if}
                                            {/volist}
                                        </select>
                                    </div>
                                    <p class="help-block col-sm-4 red">* 必填</p>
                                </div>

                                <div class="form-group">
                                    <label for="title" class="col-sm-2 control-label no-padding-right">权限标题</label>
                                    <div class="col-sm-6">
                                        <input class="form-control" id="title" placeholder="" name="title" required="required" type="text" value="{$auth_rule.title}" maxlength="20">
                                    </div>
                                    <p class="help-block col-sm-4 red">* 必填</p>
                                </div>

                                <div class="form-group">
                                    <label for="name" class="col-sm-2 control-label no-padding-right">控制器/方法名</label>
                                    <div class="col-sm-6">
                                        <input class="form-control" id="name" placeholder="" name="name" required="required" type="text" value="{$auth_rule.name}" maxlength="80">
                                    </div>
                                    <p class="help-block col-sm-4 red">* 必填</p>
                                </div>

                                <div class="form-group">
                                    <div class="col-sm-offset-2 col-sm-10">
                                        <button type="submit" class="btn btn-default">保存信息</button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </div>
    <!-- /Page Body -->
</div>
<!-- /Page Content -->

{include file='common/footer'}